#!/bin/sh -e

if [ "x${COVERITY_SCAN_PROJECT_NAME}" != "x" ] ; then exit 0; fi


build_osx() {
	FLAGS=$1
	echo "### cmake ${FLAGS}"
	cmake ${FLAGS} ..

	echo "### make"
	make

	echo "### files are"
	ls
}

cd $TRAVIS_BUILD_DIR/build
build_osx "-DOSX_PACKAGE=ON -DPYTHON_BINDINGS=ON -DWITH_EXAMPLES=ON"

cd $TRAVIS_BUILD_DIR/build_tar
build_osx "-DOSX_PACKAGE=OFF -DENABLE_PACKAGING=ON -DPYTHON_BINDINGS=ON"
echo "### make package"
make package
echo "### files are"
ls
